package file;

import java.io.File;

public class ListFileDemo {
    public static void main(String[] args) {
        File dir = new File(".");
        if(dir.isDirectory()){
            File[] subs = dir.listFiles(f->f.getName().startsWith("."));
            for (File sub : subs){
                System.out.println(sub.getName());
            }
        }else {
            System.out.println("不是一个目录");
        }

    }
}
